﻿<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/Banner.Master" CodeBehind="topRated.aspx.vb" Inherits="ETeacherforIELTS.topRated" 
    title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="style.css" rel="stylesheet" type="text/css" /> 
    <style type="text/css">
        .style19
        {
            width: 100%;
        }
        .style20
        {
            width: 100%;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="bgStyle">
        <tr>
            <td class ="sides">
                &nbsp;</td>
            <td>
                <asp:GridView ID="GridView1" DataKeyNames ="FK_MaterialName" runat="server" AutoGenerateColumns="False" 
                    DataSourceID="highestRating" CssClass ="bgStyle2" >
                    <Columns>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <table class="style20">
                                    <tr>
                                        <td>
                                            <asp:Label ID="Label3" runat="server" CssClass="TitleStyle" Text="Title"></asp:Label>
                                        </td>
                                        <td>
                                            <asp:Label ID="Label1" runat="server" CssClass="databoundStyle " 
                                                Text='<%# Eval("MaterialName") %>'></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="Label4" runat="server" CssClass ="TitleStyle" Text="Rate"></asp:Label>
                                        </td>
                                        <td>
                                            <asp:Label ID="Label2" runat="server" CssClass="databoundStyle" 
                                                Text='<%# Eval("UserRate") %>'></asp:Label>
                                        </td>
                                    </tr>
                                </table>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:ButtonField    HeaderStyle-BackColor="White"  
                                        ItemStyle-BackColor="AliceBlue" CommandName="View" 
                                        Text="View Details" ItemStyle-HorizontalAlign ="Center " ItemStyle-CssClass="TitleStyle" >
                                    <HeaderStyle  BackColor="White"  BorderColor="White" />
                                    <ItemStyle BackColor="AliceBlue" />
                                    </asp:ButtonField>
                    </Columns>
                </asp:GridView>
                <asp:SqlDataSource ID="highestRating" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                    ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
                    SelectCommand="SELECT [MaterialName], [UserRate], [FK_MaterialName] FROM [UserRatings Query] WHERE ([UserRate] &gt;= ?)">
                    <SelectParameters>
                        <asp:Parameter DefaultValue="4" Name="UserRate" Type="Double" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
            <td class ="sides">
                &nbsp;</td>
        </tr>
    </table>
</asp:Content>
